package com.hzlh.controller.pc;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzlh.model.TPcCompanyProduct;
import com.hzlh.service.TPcCompanyProductService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * (TPcCompanyProduct)表控制层
 *
 * @author makejava
 * @since 2021-06-10 09:48:36
 */
@RestController
@RequestMapping("/tPcCompanyProduct")
public class TPcCompanyProductController {
    /**
     * 服务对象
     */
    @Resource
    private TPcCompanyProductService tPcCompanyProductService;

    /**
     * 查询企业产品列表
     * @param pageIndex
     * @param pageSize
     * @return
     */
    @GetMapping("/getList")
    public PageInfo getList(@RequestParam(value = "pageIndex", defaultValue = "1", required = false) Integer pageIndex,
                            @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize) {
        PageHelper.startPage(pageIndex, pageSize);
        List<TPcCompanyProduct> list = tPcCompanyProductService.selectList(null);
        return new PageInfo<>(list);
    }
}
